import request from "@/utils/request.js"

/**
 * 分页查询图片
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const queryPicPage = (data) => {
  return request.post("/admin/pic/page", data)
}

/**
 * 查询图片
 * @param id
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const queryPicById = (id) => {
  return request.get("/admin/pic/" + id)
}

/**
 * 删除
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const removePic = (data) => {
  return request.delete("/admin/pic", {data})
}

/**
 * 导出
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const exportPicToExcel = (data) => {
  return request.post("/admin/pic/export", data, {responseType: "blob"})
}
